home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
edit
/
teco.zip
/
SEARCH.C
< prev
next >
Wrap
C/C++ Source or Header
|
1986-07-15
|
655b
|
26 lines
#include <ctype.h>
#include <stdio.h>
#include <string.h>
search() /* Search for (alt terminated) string */
{
#include "teco.h"
int match=0; /* Comparison cnt */
int tmp; /* Scratch var #1 */
bufptx++; /* Advance to nxt */
if (getbuf[getptx] == 27) goto done; /* Found string */
while (bufptx <= bufptr ) { /* Scan the array */
if (toupper(buffer[bufptx+match]) != toupper(getbuf[getptx+match])) {
bufptx++; /* Punt, no match */
match=0; /* ..reset count */
} else {
match++; /* Record a match */
if (getbuf[getptx+match] == 27) goto done;
}
}
bufptx=0; /* Pointer to beg */
done:;
}